package com.woniu.command.repaircommand;

import com.woniu.command.Command;
import com.woniu.command.handler.RepairAppCommandHandler;
import com.woniu.outlet.po.RepairAcceptance;
import com.woniu.outlet.po.RepairApplication;
import com.woniu.util.ApplicationContextHolder;

public class CheckCommand implements Command<RepairAcceptance> {

    private RepairAppCommandHandler handler;

    public CheckCommand (){
        //ApplicationContextHolder.getApplicationContext()拿到ApplicationContext
        this.handler= ApplicationContextHolder.getApplicationContext()
                .getBean(RepairAppCommandHandler.class);
    }

    @Override
    public void execute (RepairAcceptance repairAcceptance) {
        handler.check(repairAcceptance);
    }
}
